﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HFK.DxFluentUI.DataProvider
{
  public interface ICallWrapper
  {
    object Call(object argument);
  }

  public class CallWrapper<A, R> : ICallWrapper where A : class
  {
    public CallWrapper(Func<A, R> methodCall)
    {
      m_methodCall = methodCall;
    }

    public object Call(object argument)
    {
      return m_methodCall(argument as A);
    }

    private Func<A, R> m_methodCall;
  }
}
